<template>
  <div>
    <el-table :data="shopList" style="width: 100%">
      <el-table-column label="基本信息" width="600">
        <template #default="scope">
          <div>
            <img :src="scope.row.coverImgUrl" alt="" />
            <span style="margin-left: 10px; display: inline-block">{{
              scope.row.name
            }}</span>
          </div>
        </template>
      </el-table-column>
      <el-table-column label="价格" width="250">
        <template #default="scope">
          <!-- <i class="el-icon-time"></i> -->
          <span style="margin-left: 10px">￥{{ scope.row.price }}</span>
        </template>
      </el-table-column>
      <el-table-column label="链接" width="300">
        <template #default="scope">
          <!-- <i class="el-icon-time"></i> -->
          <span style="margin-left: 10px">{{ scope.row.url }}</span>
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作" width="300">
        <template #default="scope">
          <el-button
            type="info"
            size="mini"
            @click="handleEdit(scope.$index, scope.row)"
            >撤回审核</el-button
          >
          <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.$index, scope.row)"
            >删除</el-button
          >
          <el-button
            size="mini"
            type="primary"
            @click="handleModify(scope.$index, scope.row)"
            >编辑</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { goShopList } from '@/service/main/main'
export default defineComponent({
  async setup() {
    //获取商品列表
    const shopRes = await goShopList(0, 30, 1)
    let shopList = shopRes.goods
    console.log(shopList)

    return { shopRes, shopList }
  },
})
</script>

<style scoped></style>
